﻿<?xml version="1.0" encoding="utf-8" ?>
<Mapping>
  
  <Entity type="Euss:Mapping2:Keys:PersonAddress" table="T_PersonAddress">
    
    <Attribute name="Street" field="FK_Street" db-type="AnsiString" />
    <Attribute name="City" field="FK_City" db-type="AnsiString" />
    <Attribute name="Number" field="FK_Number" db-type="Int32" />
    <Attribute name="PostalCode" field="FK_PostalCode" db-type="Int32" />
    <Attribute name="PersonId" field="FK_PersonId" db-type="AnsiString" />
    <Attribute name="Type" field="Type" db-type="AnsiString" />
    
  </Entity>

  <Entity type="Euss:Mapping2:Keys:Person" table="T_Person">

    <Id>
      <Key name="Id" field="PersonId" type="assigned" db-type="AnsiString" />
    </Id>

    <Attribute name="Lastname" field="Lastname" db-type="AnsiString"
               primary-key="true" generator="assigned" />
    <Attribute name="Firstname" field="Firstname" db-type="AnsiString"
               primary-key="true" generator="native" />
    
    <Attribute name="Birthdate" field="Birthdate" db-type="DateTime" />
    
  </Entity>

  <Entity type="Euss:Mapping2:Keys:Address" table="T_Address">

    <Id>
      <Key name="Street" field="PK_Street" 
           type="assigned" db-type="AnsiString" />
      <Key name="Number" field="PK_Number" 
           type="assigned" db-type="Int32" />
      <Key name="PostalCode" field="PK_PostalCode" 
           type="assigned" db-type="Int32" />
      <Key name="City" field="PK_City" 
           type="assigned" db-type="AnsiString" />
    </Id>

    <Attribute name="ModificationDate" field="ModificationDate" 
               db-type="DateTime" />

  </Entity>
  
</Mapping>